#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>

@protocol VoiceRecordDelegate <NSObject>
- (void)didFinishVoiceRecordWithData:(NSDictionary *)itemData;
@end

@interface VoiceRecordViewController : UIViewController <AVAudioRecorderDelegate, AVAudioPlayerDelegate, UITextViewDelegate, UITextFieldDelegate>

@property (nonatomic, weak) id<VoiceRecordDelegate> delegate;
@property (nonatomic, strong) UIScrollView *scrollView;
@property (nonatomic, strong) UIView *contentView;
@property (nonatomic, strong) UIView *recordingView;
@property (nonatomic, strong) UIButton *recordButton;
@property (nonatomic, strong) UILabel *recordingStatusLabel;
@property (nonatomic, strong) UILabel *timeLabel;
@property (nonatomic, strong) UIView *waveformView;
@property (nonatomic, strong) UITextField *nameField;
@property (nonatomic, strong) UITextView *descTextView;
@property (nonatomic, strong) UILabel *placeholderLabel;
@property (nonatomic, strong) UISegmentedControl *categorySegment;
@property (nonatomic, strong) UIButton *playButton;
@property (nonatomic, strong) UIButton *saveButton;

@property (nonatomic, strong) AVAudioRecorder *audioRecorder;
@property (nonatomic, strong) AVAudioPlayer *audioPlayer;
@property (nonatomic, strong) NSString *audioFilePath;
@property (nonatomic, strong) NSTimer *recordingTimer;
@property (nonatomic, assign) NSTimeInterval recordingTime;
@property (nonatomic, assign) BOOL isRecording;

@end